<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<!-- Copyright 1997 The Open Group, All Rights Reserved -->

<title>scr_dump</title>
</head><body bgcolor=white>
<center>
<font size=2>
The Single UNIX &reg; Specification, Version 2<br>
Copyright &copy; 1997 The Open Group

</font></center><hr size=2 noshade>
<h4><a name = "tag_001_009_825">&nbsp;</a>NAME</h4><blockquote>
scr_dump, scr_init, scr_restore, scr_set
- screen file input/output functions
</blockquote><h4><a name = "tag_001_009_826">&nbsp;</a>SYNOPSIS</h4><blockquote>
<pre><code>

#include &lt;<a href="curses.h.html">curses.h</a>&gt;

int scr_dump(const char *<i>filename</i>);

int scr_init(const char *<i>filename</i>);

int scr_restore(const char *<i>filename</i>);

int scr_set(const char *<i>filename</i>);
</code>
</pre>
</blockquote><h4><a name = "tag_001_009_827">&nbsp;</a>DESCRIPTION</h4><blockquote>
The
<i>scr_dump()</i>
function writes the current contents of the virtual screen to the file named
by <i>filename</i> in an unspecified format.
<p>
The
<i>scr_restore()</i>
function sets the virtual screen to the contents of the file named by
<i>filename</i>, which must have been written using
<i>scr_dump()</i>.
The next refresh operation restores the screen to the way it looked in the
dump file.
<p>
The
<i>scr_init()</i>
function reads the contents of the file named by <i>filename</i> and uses
them to initialise the Curses
data structures to what the terminal currently has on its screen.  The next
refresh operation bases any updates on this information,
unless either of the following conditions is true:
<ul>
<p>
<li>
The terminal has been written to since the virtual screen was dumped to
<i>filename</i>
<p>
<li>
The terminfo capabilities
<b>rmcup</b>
and
<b>nrrmc</b>
are defined for the current terminal.
<p>
</ul>
<p>
The
<i>scr_set()</i>
function is a combination of
<i>scr_restore()</i>
and
<i>scr_init()</i>.
It tells the program that the information in the file named by <i>filename</i>
is what is currently on the screen, and also what the program wants on the
screen.  This can be thought of as a screen inheritance function.
</blockquote><h4><a name = "tag_001_009_828">&nbsp;</a>RETURN VALUE</h4><blockquote>
On successful completion, these functions return OK.
Otherwise, they return ERR.
</blockquote><h4><a name = "tag_001_009_829">&nbsp;</a>ERRORS</h4><blockquote>
No errors are defined.
</blockquote><h4><a name = "tag_001_009_830">&nbsp;</a>APPLICATION USAGE</h4><blockquote>
The
<i>scr_init()</i>
function is called after
<i><a href="initscr.html">initscr()</a></i>
or a
<i><a href="../xsh/system.html">system()</a></i>
call to share the screen with another process that has done a
<i>scr_dump()</i>
after its
<i><a href="endwin.html">endwin()</a></i>
call.
<p>
To read a window from a file, call
<i><a href="getwin.html">getwin()</a></i>;
to write a window to a file, call
<i><a href="putwin.html">putwin()</a></i>.
</blockquote><h4><a name = "tag_001_009_831">&nbsp;</a>SEE ALSO</h4><blockquote>
<i><a href="delscreen.html">delscreen()</a></i>,
<i><a href="doupdate.html">doupdate()</a></i>,
<i><a href="endwin.html">endwin()</a></i>,
<i><a href="getwin.html">getwin()</a></i>,
<i><a href="../xsh/open.html">open()</a></i>
(in the <b>XSH</b> specification),
<i><a href="../xsh/read.html">read()</a></i>
(in the <b>XSH</b> specification),
<i><a href="../xsh/write.html">write()</a></i>
(in the <b>XSH</b> specification),
<i><a href="curses.h.html">&lt;curses.h&gt;</a></i>.
</blockquote><hr size=2 noshade>
<center><font size=2>
UNIX &reg; is a registered Trademark of The Open Group.<br>
Copyright &copy; 1997 The Open Group
<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]

</font></center><hr size=2 noshade>
</body></html>
